#calulate all the perfect numbers within 1000
# @author: timlentse(tinglenxan@gmail.com)
# @Date:2014-11-19
#! /usr/bin/python
perfect = [i for i in xrange(2,1000) if sum([x for x in xrange(1,i) if i%x==0])==i]
print "The perfect numbers within 1000 includes ",perfect
